package com.uva.pgpi.sgcc.beans;

import java.io.Serializable;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;


@DatabaseTable(tableName = "dependencias")
public class Dependencia implements Serializable {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6122635530718538518L;
	public static final String ID_DEPENDENCIA = "idDependencia";
	public static final String ID_DEPENDE_DE = "idDependeDe";
	public static final String ID_TARGET = "idTarget";
	
	@DatabaseField(generatedId = true, columnName = ID_DEPENDENCIA)
	int idDependencia;
	
	@DatabaseField(canBeNull = false, foreign = true, foreignAutoRefresh = true, columnName=ID_DEPENDE_DE)
	Artefacto dependeDe;
	
	@DatabaseField(canBeNull = false, foreign = true, foreignAutoRefresh = true, columnName=ID_TARGET)
	Artefacto target;
	
	public Dependencia() {
	}
	
	public Dependencia(int id, Artefacto dependeDe, Artefacto target){
		this.idDependencia = id;
		this.dependeDe = dependeDe;
		this.target = target;

	}
	
	public Dependencia(Artefacto dependeDe, Artefacto target){
		this.dependeDe = dependeDe;
		this.target = target;

	}

	public int getIdDependencia() {
		return idDependencia;
	}

	public void setIdDependencia(int idDependencia) {
		this.idDependencia = idDependencia;
	}

	public Artefacto getDependeDe() {
		return dependeDe;
	}

	public void setDependeDe(Artefacto dependeDe) {
		this.dependeDe = dependeDe;
	}

	public Artefacto getTarget() {
		return target;
	}

	public void setTarget(Artefacto target) {
		this.target = target;
	}
	
	

}
